/** Definition of the Token class.
 * @file 
 * @author Jeremy Schultz
 */

#ifndef	__TOKEN_H_
#define	__TOKEN_H_

#include <string>
#include <sstream>

using namespace std;

/** Describes a Token for the PL lanaguage.
 * Base class for Tokens. 
 * Numeric and Word extend this class store specific Token types.
 */
class Token	{
	public:
		/** The valid Token types.
		 * This is all the valid Token types accepted by the PL language.
		 * The base class Token stores the Token Type
		 */
		enum TokenType	{
			// Types 
			ERROR,				/**< Error  */
			EMPTY,				/**< Empty token */
			ID,					/**< Word token */
			KEYWORD,			/**< Keyword token */
			NUMBER,				/**< Numeric token */

			// Special Symbols
			AND,				/**< & */
			LEFT_PARATHESIS,	/**< ( */
			RIGHT_PARATHESIS,	/**< ) */
			TIMES,				/**< * */
			ADD,				/**< + */
			COMMA,				/**< , */
			ARROW,				/**< -> */
			MINUS,				/**< \a - */
			PERIOD,				/**< \a . */
			DIV,				/**<  / */
			ASSIGN,				/**< := */
			SEMI_COLON,			/**< ; */
			LESS_THAN,			/**< < */
			EQUAL,				/**< = */
			GREATER_THAN,		/**< > */
			GUARD_SEPERATOR,	/**< [] */
			LEFT_BRACKET,		/**< [ */
			MOD,				/**< \ */
			RIGHT_BRACKET,		/**< ] */
			OR,					/**< | */
			NOT					/**< ~ */
		};


		/** Constuctor.
		 */
		Token();

		/** Constuctor.
		 * @param _type Token type
		 */
		Token(TokenType _type);

		static string toString(Token::TokenType t);

		/** Getter - type.
		 * @return Token type
		 */
		TokenType Type();

		/** A String representation of Token.
		 * @return A string
		 * The string format will be: <br>
		 *  type: <i>int</i> 
		 */
		string toString();

	private:
		TokenType type;		/**< Token type */

};
#endif

